<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            background-color: pink;
            padding: 10px;
            border: 15px solid red;
            margin: 20px;
        }
    </style>
</head>
<script src="./jquery.min.js"></script>
<body>
    <div></div>

    <script>
        // 1 width() height() 获取宽度和高度
        console.log($('div').width());
        // innerWidth()  innerHeight() 加上padding值
        console.log($('div').innerWidth());
        // outerWidth() outerHeight() 加上padding boder 的值
        console.log($('div').outerWidth());
        // outerWidth(true) outerHeight(true) 加上padding boder margin 的值
        console.log($('div').outerWidth(true));
    </script>
</body>
</html>